package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;

import java.io.Serializable;

@TableName("account")
public class Account implements Serializable {
    @TableId
    private Integer id;
    private Double money;

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", money=" + money +
                ", version=" + version +
                '}';
    }

    public Account(Integer id, Double money, Integer version) {
        this.id = id;
        this.money = money;
        this.version = version;
    }

    public Account() {
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getId() {
        return id;
    }

    public Double getMoney() {
        return money;
    }

    public Integer getVersion() {
        return version;
    }

    @Version
    private Integer version;

}
